
<#include "include/_meta.html">

<link rel="stylesheet" type="text/css" href="h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" href="lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
	
<title>资源管理 - 资源项</title>
<meta name="keywords" content="汽车租赁">
<meta name="description" content="H-ui.admin v2.3，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<body>
<article class="page-container">
	<form class="form form-horizontal" id="form-admin-add" >
		<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="R">
			<a href="javascript:;" onclick="resource_add('添加资源','/addResource','800','500')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加资源</a>
		</span>  
		</div>
	<table class="table">
		<tr>
			<td width="150" class="va-t"><ul id="treeDemo" class="ztree"></ul></td>
			<td class="va-t"><IFRAME ID="testIframe" Name="testIframe" FRAMEBORDER=0 SCROLLING=AUTO width=100%  height=700px SRC="/showResource"></IFRAME></td>
		</tr>
	</table>
	</form>
</article>

<!--_footer 作为公共模版分离出去--> 
<#include "include/_footer.html">
<!--/_footer /作为公共模版分离出去--> 
<script type="text/javascript" src="lib/webuploader/0.1.5/webuploader.min.js"></script> 

<!--请在下方写此页面业务相关的脚本--> 


<!--/zTree例子-->
<SCRIPT type="text/javascript">
		var setting = {
			data: {
				simpleData: {
					enable: true
				}
			},
			async: {
				enable: true,
				//contentType: "application/json",
				url:"/resource/list",
				autoParam:["id"]
			},
			callback: {
			onClick: onClick
			}
		};
		
		function onClick(event, treeId, treeNode, clickFlag) {
			demoIframe.attr("src","/showResource?permisId="+treeNode.id);
		}

		$(document).ready(function(){
			$.fn.zTree.init($("#treeDemo"), setting);
			demoIframe = $("#testIframe");
		});
		

/*资源-增加*/
function resource_add(title,url,w,h){
	layer_show(title,url,w,h);
}	
	</SCRIPT>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>